<?php

/**
 * 
 * 删除市区的数据
 * 
 */

include('./config/db.php');
$pgdb = new PGDB;

if(isset($_POST) && !empty($_POST['id'])){
    // 1. 获取区的ID
    $id = $_POST['id'];

    // 2. 删除区
    $del_area_sql = "delete from public.management_t where id = $id";
    $res = @$pgdb->query($del_area_sql);
    // 3、执行结果
    if(!$res){
        die(json_encode(array('Code'=>0x000002,'Msg'=>'删除区失败')));
    }
    die(json_encode(array('Code'=>0x000000,'Msg'=>'删除区成功')));
}else{
    die(json_encode(array('Code'=>0x000001,'Msg'=>'没有数据上传')));
}